3.128 \(\int \frac{x^2}{\sqrt{-3-4 x-x^2} \left (3+4 x+2 x^2\right )} \, dx\)

Optimal. Leaf size=98 \[ -\frac{\tan ^{-1}\left (\frac{1-\frac{x+3}{\sqrt{-x^2-4 x-3}}}{\sqrt{2}}\right )}{\sqrt{2}}+\frac{\tan ^{-1}\left (\frac{\frac{x+3}{\sqrt{-x^2-4 x-3}}+1}{\sqrt{2}}\right )}{\sqrt{2}}-\frac{1}{2} \tanh ^{-1}\left (\frac{x}{\sqrt{-x^2-4 x-3}}\right )+\frac{1}{2} \sin ^{-1}(x+2) \]

[Out]

ArcSin[2 + x]/2 - ArcTan[(1 - (3 + x)/Sqrt[-3 - 4*x - x^2])/Sqrt[2]]/Sqrt[2] + A
rcTan[(1 + (3 + x)/Sqrt[-3 - 4*x - x^2])/Sqrt[2]]/Sqrt[2] - ArcTanh[x/Sqrt[-3 -
4*x - x^2]]/2

_______________________________________________________________________________________

Rubi [A]  time = 0.483978, antiderivative size = 98, normalized size of antiderivative = 1., number of steps used = 16, number of rules used = 12, integrand size = 30, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.4 \[ -\frac{\tan ^{-1}\left (\frac{1-\frac{x+3}{\sqrt{-x^2-4 x-3}}}{\sqrt{2}}\right )}{\sqrt{2}}+\frac{\tan ^{-1}\left (\frac{\frac{x+3}{\sqrt{-x^2-4 x-3}}+1}{\sqrt{2}}\right )}{\sqrt{2}}-\frac{1}{2} \tanh ^{-1}\left (\frac{x}{\sqrt{-x^2-4 x-3}}\right )+\frac{1}{2} \sin ^{-1}(x+2) \]

Antiderivative was successfully verified.

[In]  Int[x^2/(Sqrt[-3 - 4*x - x^2]*(3 + 4*x + 2*x^2)),x]

[Out]

ArcSin[2 + x]/2 - ArcTan[(1 - (3 + x)/Sqrt[-3 - 4*x - x^2])/Sqrt[2]]/Sqrt[2] + A
rcTan[(1 + (3 + x)/Sqrt[-3 - 4*x - x^2])/Sqrt[2]]/Sqrt[2] - ArcTanh[x/Sqrt[-3 -
4*x - x^2]]/2

_______________________________________________________________________________________

Rubi in Sympy [A]  time = 83.2454, size = 116, normalized size = 1.18 \[ \frac{\sqrt{2} \operatorname{atan}{\left (\sqrt{2} \left (\frac{3 \left (\frac{x}{3} + 1\right )}{2 \sqrt{- x^{2} - 4 x - 3}} - \frac{1}{2}\right ) \right )}}{2} + \frac{\sqrt{2} \operatorname{atan}{\left (\sqrt{2} \left (\frac{3 \left (\frac{x}{3} + 1\right )}{2 \sqrt{- x^{2} - 4 x - 3}} + \frac{1}{2}\right ) \right )}}{2} + \frac{\operatorname{atan}{\left (- \frac{- 2 x - 4}{2 \sqrt{- x^{2} - 4 x - 3}} \right )}}{2} - \frac{\operatorname{atanh}{\left (\frac{x}{\sqrt{- x^{2} - 4 x - 3}} \right )}}{2} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  rubi_integrate(x**2/(2*x**2+4*x+3)/(-x**2-4*x-3)**(1/2),x)

[Out]

sqrt(2)*atan(sqrt(2)*(3*(x/3 + 1)/(2*sqrt(-x**2 - 4*x - 3)) - 1/2))/2 + sqrt(2)*
atan(sqrt(2)*(3*(x/3 + 1)/(2*sqrt(-x**2 - 4*x - 3)) + 1/2))/2 + atan(-(-2*x - 4)
/(2*sqrt(-x**2 - 4*x - 3)))/2 - atanh(x/sqrt(-x**2 - 4*x - 3))/2

_______________________________________________________________________________________

Mathematica [C]  time = 6.2692, size = 1087, normalized size = 11.09 \[ \frac{1}{2} \sin ^{-1}(x+2)+\frac{i \left (i+2 \sqrt{2}\right ) \tan ^{-1}\left (\frac{6 i \sqrt{2} x^4-16 x^4+18 i \sqrt{1-2 i \sqrt{2}} \sqrt{-x^2-4 x-3} x^3+68 i \sqrt{2} x^3-68 x^3+72 i \sqrt{1-2 i \sqrt{2}} \sqrt{-x^2-4 x-3} x^2+185 i \sqrt{2} x^2-44 x^2+99 i \sqrt{1-2 i \sqrt{2}} \sqrt{-x^2-4 x-3} x+176 i \sqrt{2} x+68 x+54 i \sqrt{1-2 i \sqrt{2}} \sqrt{-x^2-4 x-3}+51 i \sqrt{2}+60}{32 \sqrt{2} x^4+66 i x^4+208 \sqrt{2} x^3+304 i x^3+466 \sqrt{2} x^2+493 i x^2+440 \sqrt{2} x+340 i x+150 \sqrt{2}+93 i}\right )}{4 \sqrt{1-2 i \sqrt{2}}}+\frac{i \left (-i+2 \sqrt{2}\right ) \tan ^{-1}\left (\frac{6 i \sqrt{2} x^4+16 x^4+18 i \sqrt{1+2 i \sqrt{2}} \sqrt{-x^2-4 x-3} x^3+68 i \sqrt{2} x^3+68 x^3+72 i \sqrt{1+2 i \sqrt{2}} \sqrt{-x^2-4 x-3} x^2+185 i \sqrt{2} x^2+44 x^2+99 i \sqrt{1+2 i \sqrt{2}} \sqrt{-x^2-4 x-3} x+176 i \sqrt{2} x-68 x+54 i \sqrt{1+2 i \sqrt{2}} \sqrt{-x^2-4 x-3}+51 i \sqrt{2}-60}{32 \sqrt{2} x^4-66 i x^4+208 \sqrt{2} x^3-304 i x^3+466 \sqrt{2} x^2-493 i x^2+440 \sqrt{2} x-340 i x+150 \sqrt{2}-93 i}\right )}{4 \sqrt{1+2 i \sqrt{2}}}-\frac{\left (i+2 \sqrt{2}\right ) \log \left (\left (-2 i x+\sqrt{2}-2 i\right )^2 \left (2 i x+\sqrt{2}+2 i\right )^2\right )}{8 \sqrt{1-2 i \sqrt{2}}}-\frac{\left (-i+2 \sqrt{2}\right ) \log \left (\left (-2 i x+\sqrt{2}-2 i\right )^2 \left (2 i x+\sqrt{2}+2 i\right )^2\right )}{8 \sqrt{1+2 i \sqrt{2}}}+\frac{\left (i+2 \sqrt{2}\right ) \log \left (\left (2 x^2+4 x+3\right ) \left (2 i \sqrt{2} x^2+2 x^2-2 \sqrt{2 \left (1-2 i \sqrt{2}\right )} \sqrt{-x^2-4 x-3} x+8 i \sqrt{2} x+4 x-2 \sqrt{2 \left (1-2 i \sqrt{2}\right )} \sqrt{-x^2-4 x-3}+6 i \sqrt{2}+3\right )\right )}{8 \sqrt{1-2 i \sqrt{2}}}+\frac{\left (-i+2 \sqrt{2}\right ) \log \left (\left (2 x^2+4 x+3\right ) \left (-2 i \sqrt{2} x^2+2 x^2-2 \sqrt{2 \left (1+2 i \sqrt{2}\right )} \sqrt{-x^2-4 x-3} x-8 i \sqrt{2} x+4 x-2 \sqrt{2 \left (1+2 i \sqrt{2}\right )} \sqrt{-x^2-4 x-3}-6 i \sqrt{2}+3\right )\right )}{8 \sqrt{1+2 i \sqrt{2}}} \]

Antiderivative was successfully verified.

[In]  Integrate[x^2/(Sqrt[-3 - 4*x - x^2]*(3 + 4*x + 2*x^2)),x]

[Out]

ArcSin[2 + x]/2 + ((I/4)*(I + 2*Sqrt[2])*ArcTan[(60 + (51*I)*Sqrt[2] + 68*x + (1
76*I)*Sqrt[2]*x - 44*x^2 + (185*I)*Sqrt[2]*x^2 - 68*x^3 + (68*I)*Sqrt[2]*x^3 - 1
6*x^4 + (6*I)*Sqrt[2]*x^4 + (54*I)*Sqrt[1 - (2*I)*Sqrt[2]]*Sqrt[-3 - 4*x - x^2]
+ (99*I)*Sqrt[1 - (2*I)*Sqrt[2]]*x*Sqrt[-3 - 4*x - x^2] + (72*I)*Sqrt[1 - (2*I)*
Sqrt[2]]*x^2*Sqrt[-3 - 4*x - x^2] + (18*I)*Sqrt[1 - (2*I)*Sqrt[2]]*x^3*Sqrt[-3 -
 4*x - x^2])/(93*I + 150*Sqrt[2] + (340*I)*x + 440*Sqrt[2]*x + (493*I)*x^2 + 466
*Sqrt[2]*x^2 + (304*I)*x^3 + 208*Sqrt[2]*x^3 + (66*I)*x^4 + 32*Sqrt[2]*x^4)])/Sq
rt[1 - (2*I)*Sqrt[2]] + ((I/4)*(-I + 2*Sqrt[2])*ArcTan[(-60 + (51*I)*Sqrt[2] - 6
8*x + (176*I)*Sqrt[2]*x + 44*x^2 + (185*I)*Sqrt[2]*x^2 + 68*x^3 + (68*I)*Sqrt[2]
*x^3 + 16*x^4 + (6*I)*Sqrt[2]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4*x - x
^2])])/(8*Sqrt[1 + (2*I)*Sqrt[2]])

_______________________________________________________________________________________

Maple [A]  time = 0.009, size = 130, normalized size = 1.3 \[{\frac{\arcsin \left ( 2+x \right ) }{2}}-{\frac{\sqrt{3}\sqrt{4}}{12}\sqrt{3\,{\frac{{x}^{2}}{ \left ( -3/2-x \right ) ^{2}}}-12} \left ( \sqrt{2}\arctan \left ({\frac{\sqrt{2}}{6}\sqrt{3\,{\frac{{x}^{2}}{ \left ( -3/2-x \right ) ^{2}}}-12}} \right ) -{\it Artanh} \left ( 3\,{\frac{x}{-3/2-x}{\frac{1}{\sqrt{3\,{\frac{{x}^{2}}{ \left ( -3/2-x \right ) ^{2}}}-12}}}} \right ) \right ){\frac{1}{\sqrt{{1 \left ({{x}^{2} \left ( -{\frac{3}{2}}-x \right ) ^{-2}}-4 \right ) \left ( 1+{x \left ( -{\frac{3}{2}}-x \right ) ^{-1}} \right ) ^{-2}}}}} \left ( 1+{x \left ( -{\frac{3}{2}}-x \right ) ^{-1}} \right ) ^{-1}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  int(x^2/(2*x^2+4*x+3)/(-x^2-4*x-3)^(1/2),x)

[Out]

1/2*arcsin(2+x)-1/12*3^(1/2)*4^(1/2)*(3*x^2/(-3/2-x)^2-12)^(1/2)*(2^(1/2)*arctan
(1/6*(3*x^2/(-3/2-x)^2-12)^(1/2)*2^(1/2))-arctanh(3*x/(-3/2-x)/(3*x^2/(-3/2-x)^2
-12)^(1/2)))/((x^2/(-3/2-x)^2-4)/(1+x/(-3/2-x))^2)^(1/2)/(1+x/(-3/2-x))

_______________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \[ \int \frac{x^{2}}{{\left (2 \, x^{2} + 4 \, x + 3\right )} \sqrt{-x^{2} - 4 \, x - 3}}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate(x^2/((2*x^2 + 4*x + 3)*sqrt(-x^2 - 4*x - 3)),x, algorithm="maxima")

[Out]

integrate(x^2/((2*x^2 + 4*x + 3)*sqrt(-x^2 - 4*x - 3)), x)

_______________________________________________________________________________________

Fricas [A]  time = 0.304905, size = 213, normalized size = 2.17 \[ \frac{1}{16} \, \sqrt{2}{\left (4 \, \sqrt{2} \arctan \left (\frac{x + 2}{\sqrt{-x^{2} - 4 \, x - 3}}\right ) + \sqrt{2} \log \left (-\frac{2 \, \sqrt{-x^{2} - 4 \, x - 3} x + 4 \, x + 3}{x^{2}}\right ) - \sqrt{2} \log \left (\frac{2 \, \sqrt{-x^{2} - 4 \, x - 3} x - 4 \, x - 3}{x^{2}}\right ) - 4 \, \arctan \left (\frac{\sqrt{2} x + 3 \, \sqrt{2} \sqrt{-x^{2} - 4 \, x - 3}}{2 \,{\left (2 \, x + 3\right )}}\right ) - 4 \, \arctan \left (-\frac{\sqrt{2} x - 3 \, \sqrt{2} \sqrt{-x^{2} - 4 \, x - 3}}{2 \,{\left (2 \, x + 3\right )}}\right )\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate(x^2/((2*x^2 + 4*x + 3)*sqrt(-x^2 - 4*x - 3)),x, algorithm="fricas")

[Out]

1/16*sqrt(2)*(4*sqrt(2)*arctan((x + 2)/sqrt(-x^2 - 4*x - 3)) + sqrt(2)*log(-(2*s
qrt(-x^2 - 4*x - 3)*x + 4*x + 3)/x^2) - sqrt(2)*log((2*sqrt(-x^2 - 4*x - 3)*x -
4*x - 3)/x^2) - 4*arctan(1/2*(sqrt(2)*x + 3*sqrt(2)*sqrt(-x^2 - 4*x - 3))/(2*x +
 3)) - 4*arctan(-1/2*(sqrt(2)*x - 3*sqrt(2)*sqrt(-x^2 - 4*x - 3))/(2*x + 3)))

_______________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \[ \int \frac{x^{2}}{\sqrt{- \left (x + 1\right ) \left (x + 3\right )} \left (2 x^{2} + 4 x + 3\right )}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate(x**2/(2*x**2+4*x+3)/(-x**2-4*x-3)**(1/2),x)

[Out]

Integral(x**2/(sqrt(-(x + 1)*(x + 3))*(2*x**2 + 4*x + 3)), x)

_______________________________________________________________________________________

GIAC/XCAS [A]  time = 0.275116, size = 231, normalized size = 2.36 \[ -\frac{1}{2} \, \sqrt{2} \arctan \left (\frac{1}{2} \, \sqrt{2}{\left (\frac{3 \,{\left (\sqrt{-x^{2} - 4 \, x - 3} - 1\right )}}{x + 2} + 1\right )}\right ) - \frac{1}{2} \, \sqrt{2} \arctan \left (\frac{1}{2} \, \sqrt{2}{\left (\frac{\sqrt{-x^{2} - 4 \, x - 3} - 1}{x + 2} + 1\right )}\right ) + \frac{1}{2} \, \arcsin \left (x + 2\right ) - \frac{1}{4} \,{\rm ln}\left (\frac{2 \,{\left (\sqrt{-x^{2} - 4 \, x - 3} - 1\right )}}{x + 2} + \frac{3 \,{\left (\sqrt{-x^{2} - 4 \, x - 3} - 1\right )}^{2}}{{\left (x + 2\right )}^{2}} + 1\right ) + \frac{1}{4} \,{\rm ln}\left (\frac{2 \,{\left (\sqrt{-x^{2} - 4 \, x - 3} - 1\right )}}{x + 2} + \frac{{\left (\sqrt{-x^{2} - 4 \, x - 3} - 1\right )}^{2}}{{\left (x + 2\right )}^{2}} + 3\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate(x^2/((2*x^2 + 4*x + 3)*sqrt(-x^2 - 4*x - 3)),x, algorithm="giac")

[Out]

-1/2*sqrt(2)*arctan(1/2*sqrt(2)*(3*(sqrt(-x^2 - 4*x - 3) - 1)/(x + 2) + 1)) - 1/
2*sqrt(2)*arctan(1/2*sqrt(2)*((sqrt(-x^2 - 4*x - 3) - 1)/(x + 2) + 1)) + 1/2*arc
sin(x + 2) - 1/4*ln(2*(sqrt(-x^2 - 4*x - 3) - 1)/(x + 2) + 3*(sqrt(-x^2 - 4*x -
3) - 1)^2/(x + 2)^2 + 1) + 1/4*ln(2*(sqrt(-x^2 - 4*x - 3) - 1)/(x + 2) + (sqrt(-
x^2 - 4*x - 3) - 1)^2/(x + 2)^2 + 3)